package ABC;

import java.util.Arrays;
import java.util.Scanner;

public class Z031315 {
    public static void main(String[] args) {
        System.out.println("请输入一个正整数，将分解质因数存储到数组");
        Scanner in=new Scanner(System.in);
        int a=in.nextInt();
        int x=a;          //存储变量a，否则第一次循环求质因数个数时，a会被除到1为止
        int cout=0;
        for (int i=2;i<=a&&a>=2;){
            if (a%i==0){
                a=a/i;
                cout++;
                System.out.println(cout);
            }else{
                i++;
            }
        }
        int [] b=new int[cout];
        for (int i2=2,ix=0;i2<=x;){
            if (x%i2==0){
                x=x/i2;
                b[ix]=i2;
                ix++;
            }else {
                i2++;
            }
        }
        System.out.println(Arrays.toString(b));
    }
}
